<template>
  <f7-page>
    <f7-navbar :title="$t('m.awa1')" back-link=" "></f7-navbar>

    <f7-list class="margin-t20">
      <f7-list-item :title="$t('m.awa2')" class="line-input-f7-list-item">
        <input type="text" :placeholder="$t('m.awa3')" slot="after" v-model="addFormItems.tag">
      </f7-list-item>
      <f7-list-item :title="$t('m.awa4')" class="line-input-f7-list-item">
        <input type="text" :placeholder="$t('m.awa5')" slot="after" v-model="addFormItems.address">
      </f7-list-item>
    </f7-list>

    <div class="content-padding margin-t80">
      <f7-button fill color="blue" large @click="handleAdd">{{$t('m.awa6')}}</f7-button>
    </div>
  </f7-page>
</template>

<script>
  import { addUserWithdrawAddress } from "../api/home";

  export default {
    name: "add-withdrawal-address",
    data() {
      return {
          addFormItems: {
            currency_id: this.$f7route.query.id,
            tag: '',
            address: ''
          }
      }
    },
    methods: {
      handleAdd() {
        addUserWithdrawAddress(this.addFormItems).then(() => {
          this.$f7router.back();
        })
      }
    }
  }
</script>

<style scoped lang="scss">

</style>
